﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>Readme for SQL Server Plug-In Algorithms</title>
    
    
    
    <style TYPE="text/css">
body
{
background: #FFFFFF;
color: #000000;
font-family:    Verdana;
font-size: medium;
font-style: normal;
font-weight: normal;
margin-top: 0;
margin-bottom:  0;
margin-left:    0;
margin-right:   0;
width:  100%;
}

div.#mainSection
{
font-size: 70%;
width: 100%;
padding-left:    10;
margin-right: 10;
}

div.#mainBody
{
font-size: 90%;
margin-top: 10;
padding-bottom: 20;
}

div.#header
{
background-color: #D2D2D2;
padding-top:    0;
padding-bottom: 0;
padding-left:   10;
padding-right:  0;
width:          100%;
}

div.#header table
{
border-bottom-color: #C8CDDE;
border-bottom-style: solid;
border-bottom-width: 1;
width:  100%;
}

span.#runningHeaderText
{
color: #003399;
font-size: 90%;
}

span.#nsrTitle
{
/*    color: #003399;*/
font-size: 120%;
font-weight: 600;
}

div.#header table td
{
color: #000000;
font-size: 70%;
margin-top: 0;
margin-bottom:  0;
padding-right: 20;
}

div.#header table tr.#headerTableRow3 td
{
padding-bottom: 2;
padding-top: 5;
}

div.#header table.#bottomTable
{
border-top-color: #FFFFFF;
border-top-style: solid;
border-top-width: 1;
text-align: left;
}

div.#footer
{
font-size: 90%;
margin-top: 0;
margin-bottom:  0;
margin-left:    -5;
margin-right:   0;
padding-top:    2;
padding-bottom: 2;
padding-left:   0;
padding-right:  0;
width:  100%;
}

hr.#footerHR
{
border-bottom-color: #EEEEFF;
border-bottom-style: solid;
border-bottom-width: 1;
border-top-color: C8CDDE;
border-top-style: solid;
border-top-width: 1;
height: 3;
color: #D2D2D2;
}

div.section
{
padding-top:    2;
padding-bottom: 2;
padding-right:  15;
width:  100%;
}

.heading
{
color:          #000000;
font-weight:    bold;
margin-top:     18;
margin-bottom:  8;
}

h1.heading
{
color: #000000;
font-size:  150%;
}

.subHeading
{
color:          #000000;
font-weight:    bold;
font-size:      150%;
margin-bottom:  4;
}

h2.subHeading
{
color:          #000000;
font-weight:    bold;
font-size:      130%;
}
h3.subHeading
{
color:  #000000;
font-size: 125%;
font-weight: bold;
}

h4.subHeading
{
color: #000000;
font-size: 110%;
font-weight: bold;
}

h4.procedureHeading
{
color: #000080;
font-size: 110%;
font-weight: bold;
}

h5.subHeading
{
color: #000000;
font-size: 100%;
font-weight: bold;
}

img
{
padding-bottom: 10;
}

img.toggle
{
border: 0;
margin-right: 5;
padding-bottom: 10;
}

img.copyCodeImage
{
border: 0;
margin: 1;
margin-right: 3;
padding-bottom: 10;
}

img.downloadCodeImage
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.viewCodeImage
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.note
{
border: 0;
margin-right: 3;
padding-bottom: 10;
}

img.#membersOptionsFilterImage
{
border: 0;
margin-left: 10;
vertical-align: middle;
padding-bottom: 10;
}

img.#toggleAllImage
{
margin-left: 4;
vertical-align: middle;
padding-bottom: 10;
}

div.#mainSection table
{
border: 0;
font-size: 100%;
width:  100%;
margin-top: 5px;
margin-bottom: 15px;
}

div.#mainSection table tr
{
vertical-align: top;
}

div.#mainSection table th
{
text-align: left;
background: #D8D8D8;
border-bottom-color: #D8D8D8;
border-bottom-style: solid;
border-bottom-width: 1;
color: #000000;
padding-left: 5;
padding-right: 5;
}

div.#mainSection table td
{
background: #F2F2F2;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
}

div.#mainSection table td.imageCell
{
white-space: nowrap;
}

div.code
{
width: 98%;
}

div.code table
{
border: 0;
font-size: 95%;
margin-bottom: 5;
width: 100%
}

div.code table th
{
text-align: left;
background: #D8D8D8;
border-bottom-color: #D8D8D8;
border-bottom-style: solid;
border-bottom-width: 1;
color: #000000;
font-weight: bold;
padding-left: 5;
padding-right: 5;
}

div.code table td
{
background: #CCCCCC;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
padding-top: 5;
}

div.alert
{
margin-left: 10;
width: 98%;
}

div.alert table
{
border: 1;
font-size: 100%;
width:  100%;
border: solid 1 #DEDFEF;
}

div.alert table th
{
text-align: left;
background: #D8D8D8;
border-bottom-width: 0;
color: #000000;
padding-left: 5;
padding-right: 5;
border: solid 1 #DEDFEF;
}

div.alert table td
{
background: #FFFFFF;
border-top-color: #D8D8D8;
border-top-style: solid;
border-top-width: 1;
padding-left: 5;
padding-right: 5;
border: solid 1 #DEDFEF;
}

span.copyCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
float: right;
display: inline;
text-align: right;
}

.downloadCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
}

.viewCode
{
color: #0000ff;
font-size: 90%;
font-weight: normal;
cursor: hand;
}

div.code pre
{
font-family:    Monospace, Courier New, Courier;
font-size: 105%;
color:  #000000;
}

code
{
font-family:    Monospace, Courier New, Courier;
font-size: 105%;
color:  #000000;
}

dl
{
margin-top: 0;
padding-left:   1;
}

dd
{
margin-bottom:  0;
margin-left:    0;
padding-left:   20;
}

dd p
{
margin-top: 5;
}

ul
{
margin-left: 17;
list-style-type: disc;
}

ul ul
{
margin-bottom: 4;
margin-left: 17;
margin-top: 3;
list-style-type: disc;
}

ol
{
margin-left: 24;
list-style-type: decimal;
}

ol ol
{
margin-left: 24;
margin-top: 3;
list-style-type: lower-alpha;
}

li
{
margin-top: 0;
margin-bottom: 0;
padding-bottom: 0;
padding-top: 0;
margin-left: 5;
}

p
{
margin-bottom: 15;
}

.tip
{
color:  #0000FF;
font-style: italic;
cursor:hand;
text-decoration:underline;
}

.math
{
font-family: Times New Roman;
font-size: 125%
}
.sourceCodeList
{
font-family: Verdana;
font-size: 90%;
}

pre.viewCode
{
width: 100%;
overflow: auto;
}

li:hover table, li.over table
{
background-color: #C0C0C0;
}

li:hover ul, li.over ul
{
background-color: #d2d2d2;
border: 1px solid #000;
display: block;
}
            </style>
  </head>
  <body>
    <!--Topic built:10/29/2007 02:41:57-->

    
    
    
    
    
    
    
    
    
    <div id="header">
      <table width="100%" id="topTable"><tr>
          <td align="left">
            <span id="nsrTitle">Readme for SQL Server Plug-In Algorithms</span>
          </td>
          <td align="right">
            <span id="headfb" class="feedbackhead">
            </span>
          </td>
        </tr></table>
      
      
      
    </div>
    <div id="mainSection">
      <div id="mainBody"><p> 10/29/2007 2:41:57 AM</p>
        
        <font color="DarkGray">[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] </font><p /> 
        <span id="changeHistory">
        </span>
    <p>
      This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.
    </p>
    <p>
      Microsoft SQL Server Analysis Services provides a complete framework that enables third-party data mining providers to integrate the following data mining objects into Analysis Services:</p>
    <ul><li>
        Data mining algorithms, known as plug-in algorithms.<br />
      </li><li>
        Data mining viewers, known as plug-in viewers.<br />
      </li><li>
        Data Mining Web Controls Library, a library that extends data mining viewers to the Web. For more information, see <a href="html/6bb22b29-c33c-4552-86e1-dbe771cf49c2.htm">Data Mining Web Controls Library</a> in SQL Server Books Online.<br />
      </li></ul>
    <p>To help you understand how to implement data mining algorithms and viewers into Analysis Services, this readme provides instructions for the following samples:</p>
    <dl><dt>Data Mining Algorithm Plug-In</dt><dd>
        <p>This sample allows data mining algorithm developers to concentrate on the algorithm instead of on the implementation issues.</p>
      </dd></dl><dl><dt>Data Mining Viewer Plug-In</dt><dd>
        <p>This sample allows third-party algorithm providers to use their own viewers to display their new discovered patterns.</p>
      </dd></dl>
    <p>The documents and source code associated with each of these samples are located in the C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\SQL Server Data Mining Plug-In Algorithms folder. Included in this folder are tutorials that describe how to implement and use each of these samples.</p>
    <div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
      By default, the samples are not installed. To install samples, run Setup and use the <b>Advanced</b> option as described in the topic <b>Running Setup to Install AdventureWorks Sample Databases and Samples</b> in SQL Server Books Online.<p />
      An updated version of AdventureWorks database is also available for download on the  Web page.<p />
      An updated version of the SQL Server Database Engine samples is also available for download on the  Web page.<p />
    </td></tr></table><p /></div>
    <div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
      SQL Server Business Intelligence Development Studio is not supported on computers that run the Itanium-based platform; the 64-bit development environment is supported on x64-based platforms. SQL Server samples can be modified and run on computers that run either x86 or x64-based platforms when databases used by the samples are deployed on an Itanium-based platform.<p />
    </td></tr></table><p /></div>
  <h1 class="heading">Scenario</h1><div id="sectionSection0" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">A provider wants to integrate a new data mining algorithm, which is named Pair-wise Linear Regression, into Analysis Services. After integrating this new algorithm into Analysis Services, the provider wants add a new viewer for the Pair-wise Linear Regression algorithm.</p>
    </content></div><h1 class="heading">Languages</h1><div id="sectionSection1" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <ul xmlns=""><li>
          C++, for the algorithms.<br />
        </li><li>
          C#, for the viewer.<br />
        </li></ul>
    </content></div><h1 class="heading">Features</h1><div id="sectionSection2" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
    </content><sections xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <h3 class="subHeading" xmlns="">Algorithm Plug-In</h3><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
                <th>
                  Interface
                </th>
                <th>
                  Explanation
                </th>
              </tr><tr>
              <td>
                <p>IDMAlgorithm</p>
              </td>
              <td>
                <p>Implements both a model-producing learning algorithm and the prediction operations of the resulting model.</p>
              </td>
            </tr><tr>
              <td>
                <p>IDMAlgorithmNavigation</p>
              </td>
              <td>
                <p>Enables browsers to access the content of your model.</p>
              </td>
            </tr><tr>
              <td>
                <p>IDMPersist</p>
              </td>
              <td>
                <p>Enables the models learned by your algorithm to be saved and loaded by Analysis Services.</p>
              </td>
            </tr><tr>
              <td>
                <p>IDMAlgorithmMetadata</p>
              </td>
              <td>
                <p>Describes the capabilities and input parameters of your learning algorithm.</p>
              </td>
            </tr><tr>
              <td>
                <p>IDMAlgorithmFactory</p>
              </td>
              <td>
                <p>Creates instances of the objects that implement the algorithm interface and provides Analysis Services access to the algorithm metadata interface.</p>
              </td>
            </tr></table>
        </content></div>
      <h3 class="subHeading" xmlns="">Viewer Plug-In</h3><div class="subSection" xmlns=""><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
          <table width="100%" cellspacing="0" cellpadding="0" border="1" style="background-color: #CCCCCC;" xmlns=""><tr>
                <th>
                  Interface
                </th>
                <th>
                  Explanation
                </th>
              </tr><tr>
              <td>
                <p>IMiningModelViewerControl</p>
              </td>
              <td>
                <p>Implements the viewer.</p>
              </td>
            </tr></table>
        </content></div>
    </sections></div><h1 class="heading">Prerequisites</h1><div id="sectionSection3" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Before you run this sample, you should have the following software is installed:</p>
      <ul xmlns=""><li>
          
            Microsoft SQL Server, which includes the following components:<br />
          <ul><li>
              
                SQL Server Database Engine
              <br />
            </li><li>
              
                Analysis Services
              <br />
            </li><li>
              
                SQL Server Management Studio
              <br />
            </li><li>
              
                Business Intelligence Development Studio
              <br />
            </li><li>
              Two sample databases—<b>AdventureWorksDW</b> (data warehouse) and <b>AdventureWorks</b> (OLTP)<br />
            </li><li>
              
                Analysis Services Samples<br />
            </li><li>
              Adventure Works DW sample Analysis Services project, deployed to an instance of Analysis Services<br />
            </li><li>
              
                Microsoft Visual Studio 2005
              <br />
            </li></ul>
        </li></ul>
    </content></div><h1 class="heading">Building the Samples</h1><div id="sectionSection4" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">Before building the plug-in samples, you must deploy both the <b>AdventureWorksDW</b> (data warehouse) and <b>AdventureWorks</b> (OLTP) databases.</p>
      <h4 class="procedureHeading" xmlns="">To deploy the Adventure Works DW and AdventureWorks sample databases</h4><div id="procedureSectionEHBFBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, open C:\Program Files\Microsoft SQL Server\100\Tools\Samples, and then double-click the SQLServerSamples.msi file.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, open C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks Analysis Services Project, open the folder corresponding to the version of SQL Server that has been installed, and then double-click the Adventure Works.sln file. </p>
              <p xmlns="">The Adventure Works DW project opens in Business Intelligence Development Studio.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Press F5 to build and deploy the project.</p>
              <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
                Building and deploying the AdventureWorksAS project deploys the mining model to the server.<p />
              </td></tr></table><p /></div>
            </content>
          </li></ol></div>
      <p xmlns="">After you deploy the databases, you can implement the algorithm and viewer plug-ins.</p>
      <h4 class="procedureHeading" xmlns="">To implement and use the data mining algorithm plug-ins</h4><div id="procedureSectionEDBFBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, open C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\SQL Server Data Mining Plug-In Algorithms, and then double-click the SQL Server Data Mining Plug-In Algorithms Tutorial.doc file.</p>
              <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
                Implementing the plug-in sample might be easier for you if you print the tutorial and then use the printout to complete the tutorial.<p />
              </td></tr></table><p /></div>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">To build the Pair-wise Linear Regression Algorithm plug-in, complete Chapter 6, "Building a Shell Plug-In Algorithm" in the tutorial.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">To customize the Pair-wise Linear Regression Algorithm plug-in, complete Chapter 7, "Customizing the Algorithm: Pair-wise Linear Regression" in the tutorial.</p>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">To use the customized Pair-wise Linear Regression Algorithm plug-in, complete Chapter 8, "Using the Customized Plug-In Algorithm" in the tutorial.</p>
            </content>
          </li></ol></div>
      <h4 class="procedureHeading" xmlns="">To implement the proprietary viewer</h4><div id="procedureSectionEBBFBHA" class="section" xmlns=""><ol><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">In Windows Explorer, locate C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\SQL Server Data Mining Plug-In Algorithms, and then double-click the SQL Server Data Mining Plug-In Viewers Tutorial.doc file.</p>
              <div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note: </th></tr><tr><td>
                Implementing the plug-in sample might be easier for you if you print the tutorial and then use the printout to complete the tutorial.<p />
              </td></tr></table><p /></div>
            </content>
          </li><li>
            <content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
              <p xmlns="">Complete all steps in the tutorial.</p>
            </content>
          </li></ol></div>
    </content></div><h1 class="heading">Comments</h1><div id="sectionSection5" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
      <p xmlns="">To obtain a better understanding about how to implement plug-in algorithms, read the file, SQL Server Data Mining Plug-In Algorithms Whitepaper.doc, which is included with the sample tutorials.</p>
    </content></div><h1 class="heading">See Also</h1><div id="seeAlsoSection" class="section" name="collapseableSection"><h4 class="subHeading">Tasks</h4><a href="html/6bb22b29-c33c-4552-86e1-dbe771cf49c2.htm">Data Mining Web Controls Library</a><br /><br />
		<h4 class="subHeading">
			Help and Information
		</h4>
		<b>
			
			Getting SQL Server 2008 Assistance
		</b>
	</div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]--></div>
      <div id="footer">
			
			© 2007 Microsoft Corporation. All rights reserved.
		</div>
    </div>
  </body>
</html>